package com.aabte.design2.structural.adapter;

import lombok.Data;

/**
 * 假设你有两个接口相互兼容的类：圆孔（Round­Hole）和圆钉（Round­Peg）
 *
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
@Data
public class RoundHole {
    private int radius;

    public RoundHole(int radius) {
        this.radius = radius;
    }

    public boolean fits(RoundPeg peg) {
        return this.getRadius() >= peg.getRadius();
    }
}
